package com.qfjy.service.Impl;

import com.qfjy.entity.MeetingGrab;
import com.qfjy.entity.User;
import com.qfjy.mapper.MeetingGrabMapper;
import com.qfjy.service.MeetingGrabService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.List;
import java.util.UUID;
@Service
public class MeetingGrabServiceImpl implements MeetingGrabService {

    @Autowired
    private MeetingGrabMapper meetingGrabMapper;
    @Override
    public int insert(MeetingGrab meetingGrab) {
         meetingGrab.setId(UUID.randomUUID().toString());
         meetingGrab.setStatus(1);
         meetingGrab.setCreatedate(new Date());
        return meetingGrabMapper.insert(meetingGrab);
    }

    @Override
    public List<MeetingGrab> selectMeetingGrabListByUid(String uid) {
        return meetingGrabMapper.selectMeetingGrabListByUid(uid);
    }

    @Override
    public List<User> selectUserInfoByUid(String pid) {
        return meetingGrabMapper.selectUserInfoByUid(pid);
    }

   public void testGetIp(HttpServletRequest request){
       String ip = request.getRemoteHost();

   }




}